We initially fitted a null model (fit_0) than only included the predictors age and frequency as nuisance parameters, along with random intercepts by id and item, and random slopes of frequency by id, and age by item, and their correlation parameter. We then extended this model (fit_1) to include the main effect of doe, and the doe by item random slope. Finally, we added the main effect cognate (fit_2), its interaction with doe (doe:cognate), and random slopes for cognate by id. The models were implemented in brms as:
understands/produces ~ 1 + age + frequency + (1 + age | item) + (1 + frequency | id)understands/produces ~ 1 + age + frequency + doe + (1 + age + doe | item) + (1 + frequency | id)understands/produces ~ 1 + age + frequency + doe*cognate + (1 + age + doe | item) + (1 + frequency + cognate| id)brms)understands ~
1 + age + frequency + lp*cognate +
(1 + age + lp | te) +
(1 + frequency + cognate | id),
family = bernoulli("logit")
Stan code generated by brms::stancode:
We compared the performance of these models using Bayesian leave-one-out cross-validation (LOO) using the loo and loo_compare functions of the brms R package (dependent of the LOO R package). LOO consists in computing the average likelihood of each observation after estimating the model’s parameters leave that same observation out of the data set. Although the loo function uses a particular algorithm that speeds up the computation of this criterion (pareto-smooth importance sampling, PSIS), the size of our data set lead us to rely on the computation of the same criterion using a sampling approach via de loo_subsample function.
|
1
|